package com.example.aopdemo.demos.controller;

import com.example.aopdemo.demos.aspect.MyAspect;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
        @RequestMapping("/helloo")
        public String hello(){
            return "hello";
        }

    @MyAspect
    @RequestMapping("/h1")
    public String h1(){
            // int a = 10 / 0;
        return "h1";
    }

    @RequestMapping("/h2")
    public String h2(){
        int a = 10 / 0;
        return "h2";
    }
}
